package com.android.jingweiapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by cuiwenrui-pc on 15/11/8.
 */
public class GuideBean implements Parcelable {


    private List<DataEntity> data;

    public void setData(List<DataEntity> data) {
        this.data = data;
    }

    public List<DataEntity> getData() {
        return data;
    }

    public static class DataEntity implements Parcelable {
        private String title;
        private String time;
        private String content;
        private String source;

        public void setTitle(String title) {
            this.title = title;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public void setSource(String source) {
            this.source = source;
        }

        public String getTitle() {
            return title;
        }

        public String getTime() {
            return time;
        }

        public String getContent() {
            return content;
        }

        public String getSource() {
            return source;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.title);
            dest.writeString(this.time);
            dest.writeString(this.content);
            dest.writeString(this.source);
        }

        public DataEntity() {
        }

        protected DataEntity(Parcel in) {
            this.title = in.readString();
            this.time = in.readString();
            this.content = in.readString();
            this.source = in.readString();
        }

        public static final Creator<DataEntity> CREATOR = new Creator<DataEntity>() {
            public DataEntity createFromParcel(Parcel source) {
                return new DataEntity(source);
            }

            public DataEntity[] newArray(int size) {
                return new DataEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.data);
    }

    public GuideBean() {
    }

    protected GuideBean(Parcel in) {
        this.data = new ArrayList<DataEntity>();
        in.readList(this.data, List.class.getClassLoader());
    }

    public static final Parcelable.Creator<GuideBean> CREATOR = new Parcelable.Creator<GuideBean>() {
        public GuideBean createFromParcel(Parcel source) {
            return new GuideBean(source);
        }

        public GuideBean[] newArray(int size) {
            return new GuideBean[size];
        }
    };
}
